home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!cs.utexas.edu!wasatch!mailrus!iuvax!rutgers!aramis.rutgers.edu!dartagnan.rutgers.edu!mcgrew
- From: mcgrew@dartagnan.rutgers.edu (Charles Mcgrew)
- Newsgroups: comp.sources.sun
- Subject: v01i040: Patch #1 to Tooltool
- Message-ID: <Jul.12.16.01.14.1989.4757@dartagnan.rutgers.edu>
- Date: 12 Jul 89 20:01:53 GMT
- Organization: Rutgers Univ., New Brunswick, N.J.
- Lines: 270
- Approved: mcgrew@aramis.rutgers.edu
-
- Submitted-by: chuck@trantor.harris-atd.com (Chuck Musciano)
- Posting-number: Volume 1, Issue 40
- Archive-name: tooltool2.1c/patch01
-
- This patch brings tooltool from version 2.1c to version 2.1d.
-
- This patch fixes three bugs: a problem in window sizing and positioning,
- a bug in setting the mouse coordinates when a mouse event occurs, and a typo
- in the scanner which reverses the & and && operators.
-
- Chuck Musciano ARPA : chuck@trantor.harris-atd.com
- Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck
- PO Box 37, MS 3A/1912 AT&T : (407) 727-6131
- Melbourne, FL 32902 FAX : (407) 727-{5118,5227,4004}
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: patch
- # Wrapped by chuck@melmac on Thu Jun 29 07:47:52 1989
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'patch' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patch'\"
- else
- echo shar: Extracting \"'patch'\" \(6871 characters\)
- sed "s/^X//" >'patch' <<'END_OF_FILE'
- X*** Makefile.orig Thu Jun 29 07:43:38 1989
- X--- Makefile Thu Jun 1 10:25:31 1989
- X***************
- X*** 42,48 ****
- X--- 42,50 ----
- X patch: Makefile *.man *.[chy]
- X rm -f patch temp
- X -for i in Makefile *.man *.[chy] ; do \
- X+ cp orig/$$i $${i}.orig ; \
- X diff -c $${i}.orig $$i >>temp ; \
- X+ rm $${i}.orig ; \
- X done
- X sed '/^No differences encountered/d' <temp >patch
- X rm temp
- X***************
- X*** 49,55 ****
- X
- X newver:
- X for i in Makefile *.[chy] ; do \
- X! cp $$i $${i}.orig ; \
- X done
- X
- X clean:
- X--- 51,57 ----
- X
- X newver:
- X for i in Makefile *.[chy] ; do \
- X! cp $$i orig/$$i ; \
- X done
- X
- X clean:
- X*** events.c.orig Thu Jun 29 07:43:43 1989
- X--- events.c Thu Jun 29 07:32:25 1989
- X***************
- X*** 250,256 ****
- X }
- X if (tt_mouse[button][shift].defined == MOUSE_UNDEFINED)
- X return(notify_next_event_func(tty, event, arg, type));
- X! else if (tt_mouse[button][shift].defined == MOUSE_STRING)
- X a = tt_mouse[button][shift].action;
- X else if (tt_mouse[button][shift].defined == MOUSE_MENU) {
- X a = (a_ptr) menu_show(tt_mouse[button][shift].menu, tty, event, 0);
- X--- 250,256 ----
- X }
- X if (tt_mouse[button][shift].defined == MOUSE_UNDEFINED)
- X return(notify_next_event_func(tty, event, arg, type));
- X! else if (tt_mouse[button][shift].defined == MOUSE_ACTION)
- X a = tt_mouse[button][shift].action;
- X else if (tt_mouse[button][shift].defined == MOUSE_MENU) {
- X a = (a_ptr) menu_show(tt_mouse[button][shift].menu, tty, event, 0);
- X***************
- X*** 260,266 ****
- X--- 260,268 ----
- X }
- X }
- X tt_mouse_x->value->number = x;
- X+ tt_mouse_x->value->kind = V_NUMBER;
- X tt_mouse_y->value->number = y;
- X+ tt_mouse_y->value->kind = V_NUMBER;
- X tt_do_action(a);
- X return(NOTIFY_DONE);
- X }
- X*** lex.c.orig Thu Jun 29 07:43:51 1989
- X--- lex.c Thu Jun 29 07:32:26 1989
- X***************
- X*** 123,130 ****
- X PRIVATE struct {char first;
- X char next;
- X int name;
- X! } punc[] = {{'&', '\0', LOGICAL_AND},
- X! {'&', '&', AND},
- X {'&', '=', ASSIGN_AND},
- X {':', '\0', COLON},
- X {',', '\0', COMMA},
- X--- 123,130 ----
- X PRIVATE struct {char first;
- X char next;
- X int name;
- X! } punc[] = {{'&', '\0', AND},
- X! {'&', '&', LOGICAL_AND},
- X {'&', '=', ASSIGN_AND},
- X {':', '\0', COLON},
- X {',', '\0', COMMA},
- X*** parse.y.orig Thu Jun 29 07:43:54 1989
- X--- parse.y Thu Jun 29 07:32:25 1989
- X***************
- X*** 980,986 ****
- X ;
- X
- X mouse_value : shifts action
- X! { tt_mouse[curr_key][$1].defined = MOUSE_STRING;
- X tt_mouse[curr_key][$1].action = $2;
- X }
- X | shifts menu
- X--- 980,986 ----
- X ;
- X
- X mouse_value : shifts action
- X! { tt_mouse[curr_key][$1].defined = MOUSE_ACTION;
- X tt_mouse[curr_key][$1].action = $2;
- X }
- X | shifts menu
- X*** patchlevel.h.orig Thu Jun 29 07:43:56 1989
- X--- patchlevel.h Thu Jun 29 07:34:56 1989
- X***************
- X*** 36,42 ****
- X /* or without a .ttyswrc file entry. */
- X /* 25 Apr 89 2.1b Fixed the handling of meta keys in the */
- X /* function key fix. */
- X- /* */
- X /* 1 Jun 89 2.1c Clarified wording of copyright notice. */
- X /* */
- X /************************************************************************/
- X--- 36,47 ----
- X /* or without a .ttyswrc file entry. */
- X /* 25 Apr 89 2.1b Fixed the handling of meta keys in the */
- X /* function key fix. */
- X /* 1 Jun 89 2.1c Clarified wording of copyright notice. */
- X+ /* 29 Jun 89 2.1d Fixed bug in window sizing and screen */
- X+ /* positioning. */
- X+ /* Fixed reversal of AND and LOGICAL_AND */
- X+ /* in lex.c. */
- X+ /* Fixed bug in setting the value of */
- X+ /* mouse_x and mouse_y. */
- X /* */
- X /************************************************************************/
- X*** symbols.c.orig Thu Jun 29 07:43:58 1989
- X--- symbols.c Thu Jun 29 07:32:23 1989
- X***************
- X*** 121,130 ****
- X { s_ptr interval;
- X
- X tt_mouse_x = tt_find_symbol("mouse_x");
- X tt_mouse_y = tt_find_symbol("mouse_y");
- X interval = tt_find_symbol("interval");
- X interval->value->kind |= V_INTERVAL;
- X tt_delimiters = tt_find_symbol("delimiters");
- X! tt_delimiters->value->kind = 0;
- X tt_delimiters->value->str = " \t\n\r\"'";
- X }
- X--- 121,132 ----
- X { s_ptr interval;
- X
- X tt_mouse_x = tt_find_symbol("mouse_x");
- X+ tt_mouse_x->value->kind = V_NUMBER;
- X tt_mouse_y = tt_find_symbol("mouse_y");
- X+ tt_mouse_y->value->kind = V_NUMBER;
- X interval = tt_find_symbol("interval");
- X interval->value->kind |= V_INTERVAL;
- X tt_delimiters = tt_find_symbol("delimiters");
- X! tt_delimiters->value->kind = V_NOTHING;
- X tt_delimiters->value->str = " \t\n\r\"'";
- X }
- X*** tooltool.h.orig Thu Jun 29 07:44:00 1989
- X--- tooltool.h Thu Jun 29 07:32:24 1989
- X***************
- X*** 107,113 ****
- X /* The functions a mouse key can perform
- X */
- X #define MOUSE_UNDEFINED 0
- X! #define MOUSE_STRING 1
- X #define MOUSE_MENU 2
- X
- X /* The ways a choice gadget can be laid out
- X--- 107,113 ----
- X /* The functions a mouse key can perform
- X */
- X #define MOUSE_UNDEFINED 0
- X! #define MOUSE_ACTION 1
- X #define MOUSE_MENU 2
- X
- X /* The ways a choice gadget can be laid out
- X***************
- X*** 359,365 ****
- X
- X /* A mouse record holds operation to be performed by one mouse
- X * button/shift-state combination. "Defined" is one of
- X! * MOUSE_{UNDEFINED,STRING,MENU}. If MOUSE_STRING, "value" holds
- X * the text to be transmitted. If MOUSE_MENU, "menu" holds
- X * the menu to be displayed.
- X */
- X--- 359,365 ----
- X
- X /* A mouse record holds operation to be performed by one mouse
- X * button/shift-state combination. "Defined" is one of
- X! * MOUSE_{UNDEFINED,ACTION,MENU}. If MOUSE_ACTION, "action" holds
- X * the text to be transmitted. If MOUSE_MENU, "menu" holds
- X * the menu to be displayed.
- X */
- X*** windows.c.orig Thu Jun 29 07:44:02 1989
- X--- windows.c Mon Jun 12 09:24:44 1989
- X***************
- X*** 306,311 ****
- X--- 306,318 ----
- X 0);
- X gadget_columns(tt_base_window);
- X }
- X+
- X+ if (tty == NULL || tt_base_window->rows <= 0 || tt_base_window->columns <= 0) {
- X+ if (tty)
- X+ window_set(tty, WIN_SHOW, FALSE, 0);
- X+ if (tt_base_window->panel)
- X+ window_fit(tt_base_window->panel);
- X+ }
- X window_fit(tt_base_window->frame);
- X
- X fr = (Rect *) window_get(tt_base_window->frame, FRAME_OPEN_RECT);
- X***************
- X*** 359,372 ****
- X if (tty) {
- X notify_interpose_event_func(tty, tty_handler, NOTIFY_SAFE);
- X tt_ttymenu = (Menu) window_get(tty, WIN_MENU);
- X- }
- X-
- X- if (tty == NULL || tt_base_window->rows <= 0 || tt_base_window->columns <= 0) {
- X- if (tty)
- X- window_set(tty, WIN_SHOW, FALSE, 0);
- X- if (tt_base_window->panel)
- X- window_fit(tt_base_window->panel);
- X- window_fit(tt_base_window->frame);
- X }
- X
- X fr = (Rect *) window_get(tt_base_window->frame, FRAME_OPEN_RECT);
- X--- 366,371 ----
- END_OF_FILE
- if test 6871 -ne `wc -c <'patch'`; then
- echo shar: \"'patch'\" unpacked with wrong size!
- fi
- # end of 'patch'
- fi
- echo shar: End of shell archive.
- exit 0
-
- Chuck Musciano ARPA : chuck@trantor.harris-atd.com
- Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck
- PO Box 37, MS 3A/1912 AT&T : (407) 727-6131
- Melbourne, FL 32902 FAX : (407) 727-{5118,5227,4004}
-
- Oh yeah, laugh now! But when the millions start pouring in, I'll be the one
- at Burger King, sucking down Whoppers at my own private table! --Al Bundy
-